//
//  SearchInfoLearnModel.m
//  Cunli
//
//  Created by lilubin on 15/7/21.
//  Copyright (c) 2015年 lilubin. All rights reserved.
//

#import "SearchInfoLearnModel.h"

@implementation SearchInfoLearnModel

/*
- (void)setAttributes:(NSDictionary *)dataDic
{
    [super setAttributes:dataDic];
    self.modelTypename = dataDic[@"typename"];
    
    if ([dataDic[@"mttype"] isEqualToString:@"录音"] || [dataDic[@"mttype"] isEqualToString:@"视频"]) {
        self.au_or_sper = [NSString stringWithFormat:@"主讲人:%@", dataDic[@"au_or_sper"]];
    }
    else
    {
        self.au_or_sper = [NSString stringWithFormat:@"作者:%@", dataDic[@"au_or_sper"]];
    }
}
 */

+(NSDictionary *)modelCustomPropertyMapper
{
    return @{@"modelTypename":@"typename"};
}

- (BOOL)modelCustomTransformFromDictionary:(NSDictionary *)dic
{
    if ([dic[@"mttype"] isEqualToString:@"录音"] || [dic[@"mttype"] isEqualToString:@"视频"]) {
        self.au_or_sper = [NSString stringWithFormat:@"主讲人:%@", dic[@"au_or_sper"]];
    }
    else
    {
        self.au_or_sper = [NSString stringWithFormat:@"作者:%@", dic[@"au_or_sper"]];
    }
    return YES;
}

@end
